{% load staticfiles %}

<!DOCTYPE html>
<html lang="zh-cn" class="login-html">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>
    找回密码 - Python技术杂货铺
</title>
<meta name="author" content="sunmouren" />
<meta name="description" content="Python技术杂货铺" />
<meta name="keywords" content="python, django, 大学生活，写作，技术分享" />
<link rel="icon" href="{% static 'images/favicon.ico' %}">
<link  href="{% static 'css/animate.min.css' %}" rel='stylesheet'/>
<link href="{% static 'css/bootstrap.min.css' %}" rel='stylesheet'/>
<link href="{% static 'css/font-awesome.min.css' %}" rel='stylesheet'>
<link href="{% static 'css/style.css' %}" rel='stylesheet'/>
</head>
  
<body class="nopadding login-box">
<div class="login">
  <div class="login-body">
    <a class="login-brand" href="#">
      <img class="img-responsive" src="{% static 'images/logo.jpg' %}" alt="" />
    </a>
    <div class="login-form">
      <form action="{% url 'users:forget_pwd' %}" method="post" target="_top">
        {% csrf_token %}
        <div class="form-group has-icon {% if login_form.errors.username %}has-error{% endif %}">
          <label class="control-label" for="email">邮箱</label>
          <span class="fa fa-envelope-o form-control-icon" aria-hidden="true"></span>
          <input id="email" class="form-control" type="text" name="email"  placeholder="找回密码邮箱" required autocomplete="off" />
        </div>

        <button class="btn btn-teal btn-block" id="login" type="submit">发 送</button>

        <!--账户密码错误提示-->
        {% if msg or forget_pwd_form.errors.items %}
             <div class="alert alert-danger">
                <a href="#" class="close" data-dismiss="alert" >&times;</a>
                {% for key, error in login_form.errors.items %}
                    {{ error }}
                {% endfor %}
                 {{ msg }}
             </div>
        {% endif %}
      </form>
    </div>
  </div>
</div>

<script src="{% static 'js/jquery.min.js' %}" type="text/javascript"></script>
<script src="{% static 'js/bootstrap.min.js' %}" type="text/javascript"></script>
<script src="{% static 'js/jquery.lazyload.min.js' %}" type="text/javascript"></script>
<script src="{% static 'js/bootstrap-notify.min.js' %}" type="text/javascript"></script>
<script src="{% static 'js/app.js' %}" type="text/javascript"></script>
<script type="text/javascript">
    {% ifequal send_status 'ok' %}
        tips('发送成功, 请前往邮箱验证!', 'success');
    {% endifequal %}
    {% ifequal send_status 'ko' %}
        tips('发送失败，请检确认该邮箱是否存在、正确!', 'danger');
    {% endifequal %}
</script>

</body>
</html>